import request from '../utils/request.js'

//获取故障申报列表
export const getbrokenList = (data) => {
  return request({
    url: `/applet/fault/list`,
    method: "get",
    data,
  })
}

//新增故障申报
export const addbroken = (data) => {
  return request({
    url: `/applet/fault`,
    method: "post",
    data,
  })
}
//获取故障申报详情
export const getbrokenDetail = (id) => {
  return request({
    url: `/applet/fault/${id}`,
    method: "get",
  })
}

//上传图片
export const uploadImage = (data) => {
  return request({
    url: `/common/upload`,
    method: "post",
    data,
  })
}

//删除图片
export const deleteImage = (query) => {
  return request({
    url: `/common/delete?fileName=${query}`,
    method: "delete",
  })
}
